﻿
using System.ComponentModel.DataAnnotations;

namespace Radius.NET.Application.Service.ApiList.Dto
{
    public class AddApiConfigListIput
    {
        /// <summary>
        /// 编码标识
        /// </summary>
        [Required(ErrorMessage = "编码标识不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "名称不能为空")]
        public string Name { get; set; }

        /// <summary>
        /// 状态（字典 1正常 2停用）
        /// </summary>
        public StatusEnum Status { get; set; }

        /// <summary>
        /// 是否正式账套 Y:正式  N:测试
        /// </summary>
        public string IsMaster { get; set; }

        /// <summary>
        /// 是否提交 Y:启用  N:禁用
        /// </summary>
        public string IsSubmit { get; set; }

        /// <summary>
        /// 是否审核 Y:启用  N:禁用
        /// </summary>
        public string IsAudit { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public WebApiEnum Type { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    /// <summary>
    /// 查询输入
    /// </summary>
    public class QueryApiConfigListInput : BasePageInput
    {
        /// <summary>
        /// 编码标识
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 状态（字典 0正常 1停用 2删除）
        /// </summary>
        public StatusEnum Status { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public WebApiEnum Type { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }
    }

    public class DeleteApiConfigListInput
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }
    }

    public class UpdateApiConfigListInput : AddApiConfigListIput
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }
    }

    public class UpdateApiConfigListStatusInput 
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }

        /// <summary>
        /// 状态（字典 0正常 1停用 2删除）
        /// </summary>
        [Required(ErrorMessage = "外部接口清单状态不能为空")]
        public int Status { get; set; }
    }

    public class UpdateApiConfigListIsMasterInput
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }

        /// <summary>
        /// 状态（字典 0正常 1停用 2删除）
        /// </summary>
        [Required(ErrorMessage = "外部接口清单是否正式账套不能为空")]
        public string IsMaster { get; set; }
    }

    public class UpdateApiConfigListIsSubmitInput
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }

        /// <summary>
        /// 是否提交
        /// </summary>
        [Required(ErrorMessage = "外部接口清单是否提交不能为空")]
        public string IsSubmit { get; set; }
    }

    public class UpdateApiConfigListIsAuditInput
    {
        /// <summary>
        /// 外部接口清单Id
        /// </summary>
        [Required(ErrorMessage = "外部接口清单Id不能为空")]
        public long Id { get; set; }

        /// <summary>
        /// 是否审核
        /// </summary>
        [Required(ErrorMessage = "外部接口清单是否审核不能为空")]
        public string IsAudit { get; set; }
    }
}

